1. Field of the Invention
The field of the invention relates to the field of data processing and in particular, to the field of maintaining data coherency.
2. Description of the Prior Art
In data processing systems, data is often stored locally to a processor in order to improve data access speeds. However, this can result in several copies of data being held and care must be taken to ensure data coherency between the different copies of the data. Thus, when storing data locally, a state indicator is often stored along with the data indicating whether that copy of the data is a valid or invalid copy, whether it is clean—that is, the same version as that stored in memory, or dirty—that is it is a more up to date version than the version stored in memory. There may in some systems be further indicators such as a data unique indicator that indicates that that copy is the only local copy, or a shared indicator indicating that there is more than one local copy.
Data coherency is maintained with snoop requests, which, in response to a read request, snoop local data stores to see where the most up to date version of the data is stored. This data may then be retrieved and the state indicator associated with the data may be updated. If a copy of data stored in a local store is dirty, then prior to it being evicted from the local store it must be written back to memory.
Data hazards can occur when a write request to one address is requested when a read request to that address and the snoops that it has generated are still pending. In order to address this problem in conventional systems, snoop responses to addresses that have a write pending are blocked until the write completes, whereupon they can proceed. This has a drawback of requiring sufficient buffer space to guarantee forward progress of the write, as if the write cannot proceed there may be a mutual resource dependency which may result in a deadlock situation. As systems scale up with many more recipients and initiators, this problem of providing sufficient buffer space to guarantee forward progress of writes will also become larger. This has a power and area implication.
It would be desirable to avoid data hazards without unduly increasing power consumption and die area.